package ${packageName};

<#list importList as item>
import ${item};
</#list>

@ApiModel("${apiModelName!entityClassName}实体类")
public class ${entityClassName} implements Serializable {

    private static final long serialVersionUID = 1L;

<#function isNullable field>
    <#local map={} >
    <#local annotation = "NotNull">
    <#if field.isNullable == 0 && field.isPrimary == 0 && field.colName != "Fcreate_time" && field.colName != "Fmodify_time">
        <#local map = map + {"flag":true}>
        <#if field.type == "String">
            <#local annotation = "NotBlank">
        <#elseif field.type?contains("List")>
            <#local annotation = "NotEmpty">
        </#if>
    <#else>
        <#local map = map + {"flag":false}>
    </#if>
    <#return map + {"annotation":annotation}>
</#function>
<#list fieldList as item>
    <#assign canNull = isNullable(item)>
<#if canNull.flag>
    @${canNull.annotation}(message="不能为空")
</#if>
    @ApiModelProperty("${item.apiModelProperty}")
    private ${item.type} ${item.varName};

</#list>

<#list fieldList as item>
    public ${item.type} get${item.varName?cap_first}(){
        return ${item.varName};
    }

    public void set${item.varName?cap_first}(${item.type} ${item.varName}){
        this.${item.varName} = ${item.varName};
    }

</#list>

}